<script>
    $(function() {
        $( "#tabs" ).tabs();
    });

    $(document).ready(function() {
         loadCT();
    });

    function loadCT(){
        $.ajax({
            type: "POST",
            url: "../ajax/ctscan",
            data: {
                p_id:$("input#p_id").val(),
                c_id:$("input#c_id").val()
            },
            dataType: "html",
            success: function(data) {
                $("#CTScanFile").html(data);
            }
        });
    }
</script>

<div style="padding-left: 10px;padding-top: 10px; width: 100%;height: 110%;background-image:url(<?php echo URL::base()?>assets/images/background.jpg)" align="left" class="ui-widget ui-corner-all">
    <input type="hidden" id="p_id" value="<?php echo $history['p_id']?>">
    <input type="hidden" id="c_id" value="<?php echo $history['c_id']?>">
    <table width="99%" class="ui-widget ui-widget-content ui-corner-all">
        <thead><tr class="ui-widget-header"><td>ครั้งที่</td><td>คุณหมอเจ้าของไข้</td><td>คุณหมอที่ปรึกษา</td><td>สถานที่ทำการตรวจ</td><td>วันเวลาที่เริ่มตรวจ</td><td>วันเวลาที่ตรวจเสร็จ</td></tr></thead>
        <?php
        echo  "<tr>                    
                    <td>".$history['c_id']."</td>
                    <td>".$history['doctor_name']."</td>
                    <td>".$history['consult_doctor_name']."</td>
                    <td>".$history['pp_name']."</td>
                    <td>".$history['consult_start']."</td>
                    <td>".$history['consult_end']."</td>                    
               </tr>";

        ?>

    </table>
    <br>

    <table width="99%" class="ui-widget ui-widget-content ui-corner-all">
        <tr>
            <td align="left" valign="top" style="padding: 10px">
                <div id="tabs">
                    <ul>
                        <li><a href="#tabs-1" style="font-size: 11px">NIHSS</a></li>
                        <li><a href="#tabs-2" style="font-size: 11px">Stroke Data</a></li>
                        <li><a href="#tabs-3" style="font-size: 11px">Stroke Physical</a></li>
                        <li><a href="#tabs-4" style="font-size: 11px">Laboratory screen</a></li>
                        <li><a href="#tabs-5" style="font-size: 11px">ประเมินทางประสาทวิทยา</a></li>
                        <li><a href="#tabs-6" style="font-size: 11px">Management</a></li>                        
                    </ul>

                    <div id="tabs-1">
                        <table class="ui-widget ui-widget-content ui-corner-all" cellspacing="0">
                            <tr id="no1a_tro">
                                <td valign="top"> 1a. Level of consciousness </td>
                                <td style="padding-left: 5px">
                                    <div id="no1a">
                                        <?php echo isset($nihss['no1a'])? ($nihss['no1a'] == 0? "Alert (0)": "") : "" ?>
                                        <?php echo isset($nihss['no1a'])? ($nihss['no1a'] == 1? "Drowsy (1)": "") : "" ?>
                                        <?php echo isset($nihss['no1a'])? ($nihss['no1a'] == 2? "Stuporous (2)": "") : "" ?>
                                        <?php echo isset($nihss['no1a'])? ($nihss['no1a'] == 3? "Coma (3)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr bgcolor="#E4E4E4" id="no1b_tro">
                                <td valign="top"> 1b. Two questions ถามอายุและเดือน </td>
                                <td style="padding-left: 5px">
                                    <div id="no1b">
                                        <?php echo isset($nihss['no1b'])? ($nihss['no1b'] == 0? "Both correct (0)": "") : "" ?>
                                        <?php echo isset($nihss['no1b'])? ($nihss['no1b'] == 1? "One correct (1)": "") : "" ?>
                                        <?php echo isset($nihss['no1b'])? ($nihss['no1b'] == 2? "None correct (2)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr id="no1c_tro">
                                <td valign="top"> 1c. Two commands หลับตา ลืมตาและกำมือ แบมือ  </td>
                                <td style="padding-left: 5px">
                                    <div id="no1c">
                                        <?php echo isset($nihss['no1c'])? ($nihss['no1c'] == 0? "Obeys both (0)": "") : "" ?>
                                        <?php echo isset($nihss['no1c'])? ($nihss['no1c'] == 1? "Obeys none (1)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr bgcolor="#E4E4E4" id="no2_tro">
                                <td valign="top"> 2. Best gaze มองด้านข้าง  </td>
                                <td style="padding-left: 5px">
                                    <div id="no2">
                                        <?php echo isset($nihss['no2'])? ($nihss['no2'] == 0? "Normal (0)": "") : "" ?>
                                        <?php echo isset($nihss['no2'])? ($nihss['no2'] == 1? "Partial gaze palsy (1)": "") : "" ?>
                                        <?php echo isset($nihss['no2'])? ($nihss['no2'] == 2? "Forced deviation (2)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr id="no3_tro">
                                <td valign="top"> 3. Best visual (visual field)</td>
                                <td style="padding-left: 5px">
                                    <div id="no3">
                                        <?php echo isset($nihss['no3'])? ($nihss['no3'] == 0? "No visual loss (0)": "") : "" ?>
                                        <?php echo isset($nihss['no3'])? ($nihss['no3'] == 1? "Partial hemianopia (1)": "") : "" ?>
                                        <?php echo isset($nihss['no3'])? ($nihss['no3'] == 2? "Complete  hemianopia (2)": "") : "" ?>
                                        <?php echo isset($nihss['no3'])? ($nihss['no3'] == 3? "Bilateral hemianopia (3)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr bgcolor="#E4E4E4" id="no4_tro">
                                <td valign="top"> 4. Facial palsy</td>
                                <td style="padding-left: 5px">
                                    <div id="no4">
                                        <?php echo isset($nihss['no4'])? ($nihss['no4'] == 0? "Normal (0)": "") : "" ?>
                                        <?php echo isset($nihss['no4'])? ($nihss['no4'] == 1? "Minor (1)": "") : "" ?>
                                        <?php echo isset($nihss['no4'])? ($nihss['no4'] == 2? "Partial (2)": "") : "" ?>
                                        <?php echo isset($nihss['no4'])? ($nihss['no4'] == 3? "Complete (3)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr id="no5a_tro">
                                <td valign="top"> 5a. Best Motor Lt arms นั่งยกแขน 90 องศา 10 วินาทีหรือนอนยกแขน 45 องศา</td>
                                <td style="padding-left: 5px">
                                    <div id="no5a">
                                        <?php echo isset($nihss['no5a'])? ($nihss['no5a'] == 0? "No drift (0)": "") : "" ?>
                                        <?php echo isset($nihss['no5a'])? ($nihss['no5a'] == 1? "Drift (1)": "") : "" ?>
                                        <?php echo isset($nihss['no5a'])? ($nihss['no5a'] == 2? "Fall in 10 secs (2)": "") : "" ?>
                                        <?php echo isset($nihss['no5a'])? ($nihss['no5a'] == 3? "No effort against gravity (3)": "") : "" ?>
                                        <?php echo isset($nihss['no5a'])? ($nihss['no5a'] == 4? "No movement (4)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr bgcolor="#E4E4E4" id="no5b_tro">
                                <td valign="top"> 5b. Best Motor Rt arms นั่งยกแขน 90 องศา 10 วินาทีหรือนอนยกแขน 45 องศา</td>
                                <td style="padding-left: 5px">
                                    <div id="no5b">
                                        <?php echo isset($nihss['no5b'])? ($nihss['no5b'] == 0? "No drift (0)": "") : "" ?>
                                        <?php echo isset($nihss['no5b'])? ($nihss['no5b'] == 1? "Drift (1)": "") : "" ?>
                                        <?php echo isset($nihss['no5b'])? ($nihss['no5b'] == 2? "Fall in 10 secs (2)": "") : "" ?>
                                        <?php echo isset($nihss['no5b'])? ($nihss['no5b'] == 3? "No effort against gravity (3)": "") : "" ?>
                                        <?php echo isset($nihss['no5b'])? ($nihss['no5b'] == 4? "No movement (4)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr id="no6a_tro">
                                <td valign="top"> 6a. Best Motor Lt legs นอนยกขา 30 องศา 5 วินาที </td>
                                <td style="padding-left: 5px">
                                    <div id="no6a">
                                        <?php echo isset($nihss['no6a'])? ($nihss['no6a'] == 0? "No drift (0)": "") : "" ?>
                                        <?php echo isset($nihss['no6a'])? ($nihss['no6a'] == 1? "Drift (1)": "") : "" ?>
                                        <?php echo isset($nihss['no6a'])? ($nihss['no6a'] == 2? "Fall in 10 secs (2)": "") : "" ?>
                                        <?php echo isset($nihss['no6a'])? ($nihss['no6a'] == 3? "No effort against gravity (3)": "") : "" ?>
                                        <?php echo isset($nihss['no6a'])? ($nihss['no6a'] == 4? "No movement (4)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr bgcolor="#E4E4E4" id="no6b_tro">
                                <td valign="top"> 6b. Best Motor Rt legs นอนยกขา 30 องศา 5 วินาที </td>
                                <td style="padding-left: 5px">
                                    <div id="no6b">
                                        <?php echo isset($nihss['no6b'])? ($nihss['no6b'] == 0? "No drift (0)": "") : "" ?>
                                        <?php echo isset($nihss['no6b'])? ($nihss['no6b'] == 1? "Drift (1)": "") : "" ?>
                                        <?php echo isset($nihss['no6b'])? ($nihss['no6b'] == 2? "Fall in 10 secs (2)": "") : "" ?>
                                        <?php echo isset($nihss['no6b'])? ($nihss['no6b'] == 3? "No effort against gravity (3)": "") : "" ?>
                                        <?php echo isset($nihss['no6b'])? ($nihss['no6b'] == 4? "No movement (4)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr id="no7_tro">
                                <td valign="top"> 7. Limb Ataxia </td>
                                <td style="padding-left: 5px">
                                    <div id="no7">
                                        <?php echo isset($nihss['no7'])? ($nihss['no7'] == 0? "Absent (0)": "") : "" ?>
                                        <?php echo isset($nihss['no7'])? ($nihss['no7'] == 1? "Upper or lower limb (1)": "") : "" ?>
                                        <?php echo isset($nihss['no7'])? ($nihss['no7'] == 2? "Upper & lower limb (2)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr bgcolor="#E4E4E4" id="no8_tro">
                                <td valign="top"> 8. Sensory </td>
                                <td style="padding-left: 5px">
                                    <div id="no8">
                                        <?php echo isset($nihss['no8'])? ($nihss['no8'] == 0? "Normal (0)": "") : "" ?>
                                        <?php echo isset($nihss['no8'])? ($nihss['no8'] == 1? "Partial loss (1)": "") : "" ?>
                                        <?php echo isset($nihss['no8'])? ($nihss['no8'] == 2? "Dense loss (2)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr id="no9_tro">
                                <td valign="top"> 9. Best language Aphasia </td>
                                <td style="padding-left: 5px">
                                    <div id="no9">
                                        <?php echo isset($nihss['no9'])? ($nihss['no9'] == 0? "No aphasia (0)": "") : "" ?>
                                        <?php echo isset($nihss['no9'])? ($nihss['no9'] == 1? "Mild to moderate (1)": "") : "" ?>
                                        <?php echo isset($nihss['no9'])? ($nihss['no9'] == 2? "Severe (2)": "") : "" ?>
                                        <?php echo isset($nihss['no9'])? ($nihss['no9'] == 3? "Mute (3)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr bgcolor="#E4E4E4" id="no10_tro">
                                <td valign="top"> 10. Dysarthria </td>
                                <td style="padding-left: 5px">
                                    <div id="no10">
                                        <?php echo isset($nihss['no10'])? ($nihss['no10'] == 0? "Normal articulation (0)": "") : "" ?>
                                        <?php echo isset($nihss['no10'])? ($nihss['no10'] == 1? "Mild to moderate (1)": "") : "" ?>
                                        <?php echo isset($nihss['no10'])? ($nihss['no10'] == 2? "Severe (2)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>
                            <tr id="no11_tro">
                                <td valign="top"> 11. Neglect </td>
                                <td style="padding-left: 5px">
                                    <div id="no11">
                                        <?php echo isset($nihss['no11'])? ($nihss['no11'] == 0? "No neglect (0)": "") : "" ?>
                                        <?php echo isset($nihss['no11'])? ($nihss['no11'] == 1? "Sensory or visual (1)": "") : "" ?>
                                        <?php echo isset($nihss['no11'])? ($nihss['no11'] == 2? "Sensory & visual (2)": "") : "" ?>
                                    </div>
                                </td>
                            </tr>                            
                        </table>
                    </div>

                    <div id="tabs-2">
                        <table id="users" class="ui-widget ui-widget-content ui-corner-all" width="100%" style="margin-top: 10px;padding-bottom: 10px;">
                            <thead>
                                <tr class="ui-widget-header ">
                                    <th colspan="7" align="left" style="padding: 10px">Stroke Data</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td colspan="2">
                                        <table width="100%"><tr>
                                                <td>วันที่ </td><td align="left"><u style="color: blue"><?php
                                                        echo date("Y-m-d");
                                                        ?></u></td><td align="left">ชื่อ </td><td><u style="color: blue"><?php echo $patient['p_fname']." ".$patient['p_lname']  ?></u></td><td></td><td></td>
                                            </tr></table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <table width="100%">
                                            <tr>
                                                <td width="100">อายุ <font color="blue"> <?php echo date("Y")-strftime("%Y",strtotime($patient['p_bday']));?> </font>ปี</td>
                                                <td>วันเดือนปีเกิด :<font color="blue">  <?php echo $patient['p_bday'];?></font></td><td></td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <table style="border:solid gray 1px">
                                            <tr>
                                                <td rowspan="2" width="150">เวลาที่เกิดอาการ </td>
                                                <td>
                                                    <div id="strokeTime" class="d2">
                                                        <?php   if(isset($std['strokeTimeYN']) && $std['strokeTimeYN']=="yes") {
                                                            echo "ทราบ ";
                                                            echo isset($std['strokeTimeHour'])? " เวลา ".$std['strokeTimeHour'] :"00";
                                                            echo isset($std['strokeTimeMinute'])? " : ".$std['strokeTimeMinute'] :"00";
                                                            echo " วันที่: " .$std['strokeTimeDMY'];
                                                        }else if(isset($std['strokeTimeYN']) && $std['strokeTimeYN']=="no") {
                                                            echo "ไม่ทราบ ";
                                                        }
                                                        ?>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <table style="border:solid gray 1px">
                                            <tr>
                                                <td rowspan="2" width="150">เวลาสุดท้ายที่ปกติ </td>
                                                <td><div id="strokeNormalTime" class="d2">
                                                        <?php   if(isset($std['strokeNormalTimeYN']) && $std['strokeNormalTimeYN']=="yes") {
                                                            echo "ทราบ ";
                                                            echo isset($std['strokeNormalTimeHour'])? "เวลา ".$std['strokeNormalTimeHour'] :"00";
                                                            echo isset($std['strokeNormalTimeMinute'])? " : ".$std['strokeNormalTimeMinute'] :"00";
                                                            echo " วันที่: ".$std['strokeNormalTimeDMY'];
                                                        }else if(isset($std['strokeNormalTimeYN']) && $std['strokeNormalTimeYN']=="no") {
                                                            echo "ไม่ทราบ ";
                                                        }
                                                        ?>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <table>
                                            <tr>
                                                <td width="120">เหลือเวลาอีก</td>
                                                <td width="40" align="center"><div style="color: red;" id="strokeLeftHour"></div> </td><td>ชั่วโมง</td>
                                                <td width="40" align="center"> <div style="color: red;" id="strokeLeftMinute"></div></td><td>นาที</td>
                                            </tr>
                                        </table>
                                </tr>
                                <tr>
                                    <td>
                                        CC:
                                    </td>
                                    <td><div style="color:blue" id="cc"><?php echo isset($std['cc'])? $std['cc']:"" ?></div></td>
                                </tr>
                                <tr>
                                    <td>
                                        PI:
                                    </td>
                                    <td>
                                        <div style="color:blue" id="PI"><?php echo isset($std['PI'])?$std['PI']:"" ?></div>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <!--
                                        <table style="margin-left: 5px">
                                            <tr><td width="100">Headache</td><td><input id="headache" name="headache" type="radio" value="yes" <?php echo isset($std['headache'])? ($std['headache'] == "yes"? "checked": "") : "" ?>>Yes</td><td><input id="headache" name="headache" type="radio" value="no" <?php echo isset($std['headache'])? ($std['headache'] == "no"? "checked": "") : "" ?>>No</td><td></td><td></td></tr>
                                            <tr><td width="100"></td><td>ข้างที่ปวดรุนแรง</td><td><input id="sideheadache" name="sideheadache" type="radio" value="l" <?php echo isset($std['sideheadache'])? ($std['sideheadache'] == "l"? "checked": "") : "" ?>>Left</td><td><input id="sideheadache" name="sideheadache" type="radio" value="r" <?php echo isset($std['sideheadache'])? ($std['sideheadache'] == "r"? "checked": "") : "" ?>>Right</td><td><input id="sideheadache" name="sideheadache" type="radio" value="b" <?php echo isset($std['sideheadache'])? ($std['sideheadache'] == "b"? "checked": "") : "" ?>>Bilateral</td></tr>
                                            <tr><td width="100"></td><td>ความรุนแรง</td><td><input id="muchheadache" name="muchheadache" type="radio" value="ml" <?php echo isset($std['muchheadache'])? ($std['muchheadache'] == "ml"? "checked": "") : "" ?>>Mild</td><td><input id="muchheadache" name="muchheadache" type="radio" value="mr" <?php echo isset($std['muchheadache'])? ($std['muchheadache'] == "mr"? "checked": "") : "" ?>>Moderate</td><td><input id="muchheadache" name="muchheadache" type="radio" value="s" <?php echo isset($std['muchheadache'])? ($std['muchheadache'] == "s"? "checked": "") : "" ?>>Severe</td></tr>
                                            <tr><td width="100"></td><td>ตำแหน่งการปวด</td><td><input id="areaheadache" name="areaheadache" type="radio" value="f" <?php echo isset($std['areaheadache'])? ($std['areaheadache'] == "f"? "checked": "") : "" ?>>หน้าฝาก</td><td><input id="areaheadache" name="areaheadache" type="radio" value="l" <?php echo isset($std['areaheadache'])? ($std['areaheadache'] == "l"? "checked": "") : "" ?>>ท้ายทอย</td><td><input id="areaheadache" name="areaheadache" type="radio" value="k" <?php echo isset($std['areaheadache'])? ($std['areaheadache'] == "k"? "checked": "") : "" ?>>ขมับ</td>
                                                <td><input id="areaheadache" name="areaheadache" type="radio" value="o" <?php echo isset($std['areaheadache'])? ($std['areaheadache'] == "o"? "checked": "") : "" ?>>อื่นๆ<input type="text" id="areaheadache_other" name="areaheadache_other" value="<?php echo isset($std['areaheadache_other'])? $std['areaheadache_other']:"" ?>"></td></tr>
                                        </table>-->
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top">
                                        PH:
                                    </td>
                                    <td>
                                        <table width="100%" style="border: solid 1px gray">
                                            <tr><td><table><tr><td><input type="checkbox" id="ph_ht_yn" name="ph_ht_yn" disabled <?php echo isset($std['ph_ht_yn'])? ($std['ph_ht_yn'] == "true"? "checked": "") : "" ?>>HT</td><td>
                                                                <div id="ph_ht_yrs" style="color:blue;width: 80px" align="center"><?php echo isset($std['ph_ht_yrs'])?$std['ph_ht_yrs']:"" ?></div></td><td>Yrs.</td>
                                                            <td>Med</td>
                                                            <td><div id="ph_ht_med" style="color:blue;width: 80px" align="center"><?php echo isset($std['ph_ht_med'])?$std['ph_ht_med']:"" ?></div></td>
                                                            <td><input type="checkbox" id="ph_dm_yn" name="ph_dm_yn" disabled <?php echo isset($std['ph_dm_yn'])? ($std['ph_dm_yn'] == "true"? "checked": "") : "" ?>>DM</td><td>
                                                                <div id="ph_dm_yrs" style="color:blue;width: 80px" align="center"><?php echo isset($std['ph_dm_yrs'])?$std['ph_dm_yrs']:"" ?></div></td><td>Yrs.</td>
                                                            <td>Med</td><td>
                                                                <div id="ph_dm_med" style="color:blue;width: 80px" align="center"><?php echo isset($std['ph_dm_med'])?$std['ph_dm_med']:"" ?></div></td></tr></table></td></tr>
                                            <tr><td><table><tr><td><input type="checkbox" id="ph_dyslipidemia_yn"  name="ph_dyslipidemia_yn" disabled <?php echo isset($std['ph_dyslipidemia_yn'])? ($std['ph_dyslipidemia_yn'] == "true"? "checked": "") : "" ?>>Dyslipidemia</td><td>
                                                                <div id="ph_dyslipidemia_yrs" style="color:blue;width: 80px" align="center"><?php echo isset($std['ph_dyslipidemia_yrs'])?$std['ph_dyslipidemia_yrs']:"" ?></div></td><td>Yrs.</td><td>Med</td><td>
                                                                <div id="ph_dyslipidemia_med" style="color:blue;width: 80px" align="center"><?php echo isset($std['ph_dyslipidemia_med'])?$std['ph_dyslipidemia_med']:"" ?></div></td></tr></table></td></tr>
                                            <tr><td><table><tr><td><input type="checkbox" id="ph_smoking_yn" name="ph_smoking_yn" disabled <?php echo isset($std['ph_smoking_yn'])? ($std['ph_smoking_yn'] == "true"? "checked": "") : "" ?>>Smoking</td><td>
                                                                <div id="ph_smoking_pack" style="color:blue;width: 80px" align="center"><?php echo isset($std['ph_smoking_pack'])?$std['ph_smoking_pack']:"" ?></div></td><td>Packs/day</td><td>
                                                                <div id="ph_smoking_yrs" style="color:blue;width: 80px" align="center"><?php echo isset($std['ph_smoking_yrs'])?$std['ph_smoking_yrs']:"" ?></div></td><td>Yrs.</td><td>Quit</td><td>
                                                                <div id="ph_smoking_qyrs" style="color:blue;width: 80px" align="center"><?php echo isset($std['ph_smoking_qyrs'])?$std['ph_smoking_qyrs']:"" ?></div></td><td>Yrs.</td></tr></table></td></tr>
                                            <tr><td><table width="100%"><tr><td><input type="checkbox" id="ph_heart_disease_yn" name="ph_heart_disease_yn" disabled <?php echo isset($std['ph_heart_disease_yn'])? ($std['ph_heart_disease_yn'] == "true"? "checked": "") : "" ?>>Heart disease type</td><td>
                                                                <div id="ph_heart_disease_type" style="color:blue;width: 100%" align="left"><?php echo isset($std['ph_heart_disease_type'])?$std['ph_heart_disease_type']:"" ?></div></td><td>Med</td><td>
                                                                <div id="ph_heart_disease_med" style="color:blue;width: 100%" align="left"><?php echo isset($std['ph_heart_disease_med'])?$std['ph_heart_disease_med']:"" ?></div></td></tr></table></td></tr>
                                            <tr><td><table><tr><td><input type="checkbox" id="ph_stroke_yn" name="ph_stroke_yn" disabled <?php echo isset($std['ph_stroke_yn'])? ($std['ph_stroke_yn'] == "true"? "checked": "") : "" ?>>Stroke</td><td>
                                                                <div id="ph_stroke_year" style="color:blue;width: 100px" align="center"><?php echo isset($std['ph_stroke_year'])?$std['ph_stroke_year']:"" ?></div></td><td>Yrs.</td>
                                                            <td>Type</td><td>
                                                                <div id="ph_stroke_type" style="color:blue;width: 100%" align="left">
                                                                    <?php
                                                                    echo isset($std['ph_stroke_type'])? ($std['ph_stroke_type'] == "i"? "ischemic": "") : "";
                                                                    echo isset($std['ph_stroke_type'])? ($std['ph_stroke_type'] == "ich"? "ICH": "") : "";
                                                                    echo isset($std['ph_stroke_type'])? ($std['ph_stroke_type'] == "sah"? "SAH": "") : "" ?>
                                                                </div>
                                                            </td></tr></table></td></tr>

                                            <tr><td><table><tr><td><input type="checkbox" id="ph_others_yn" name="ph_others_yn" disabled <?php echo isset($std['ph_others_yn'])? ($std['ph_others_yn'] == "true"? "checked": "") : "" ?>>Others</td><td>
                                                                <div id="ph_others" style="color:blue;width: 100%" align="left"><?php echo isset($std['ph_others'])?$std['ph_others']:"" ?></div></td></tr></table></td></tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr><td colspan="4" align="center"></td></tr>
                            </tbody>
                        </table>
                    </div>

                    <div id="tabs-3">
                        <table id="users" class="ui-widget ui-widget-content ui-corner-all" width="102%" style="margin-top: 5px;padding-bottom: 10px;">
                            <thead>
                                <tr class="ui-widget-header ">
                                    <th colspan="7" align="left" style="padding: 10px">Stroke Physical examination</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr><td colspan="2">
                                        <table>
                                            <tr>
                                                <td width="10"><b><u>BP</u></b>:</td>
                                                <td width="10"><div id="BPmax" class="d" align="right"><?php echo isset($stp['BPmax'])?$stp['BPmax']:"-" ?></div></td>
                                                <td>/</td>
                                                <td width="10"><div class="d"  id="BPmin"><?php echo isset($stp['BPmin'])?$stp['BPmin']:"-" ?></div></td>
                                                <td>,</td>
                                                <td width="10"><b><u>PR:</u></b></td>
                                                <td><div id="PR" class="d" align="right"><?php echo isset($stp['PR'])?$stp['PR']:"-" ?></div></td>
                                                <td>/</td>
                                                <td>min regular</td>
                                                <td>
                                                    <div id="PRminYN" class="d">
                                                        <?php echo isset($stp['PRminYN'])? ($stp['PRminYN'] == "y"? "<font color=blue>Yes</font>": "") : "" ?>
                                                        <?php echo isset($stp['PRminYN'])? ($stp['PRminYN'] == "n"? "<font color=red>No</font>": "") : "" ?>
                                                    </div>
                                                </td></tr>
                                        </table>
                                        <table>
                                            <tr><td style="padding-left: 5px"><b><u>Carotid bruit</u></b></td>
                                                <td>Lt: </td>
                                                <td><div id="CarotidLt" class="d">
                                                        <?php echo isset($stp['CarotidLt'])? ($stp['CarotidLt'] == "y"? "<font color=blue>Yes</font>": "") : "" ?>
                                                        <?php echo isset($stp['CarotidLt'])? ($stp['CarotidLt'] == "n"? "<font color=red>No</font>": "") : ";" ?>
                                                    </div></td>
                                                <td>Rt:</td>
                                                <td><div id="CarotidRt" class="d">
                                                        <?php echo isset($stp['CarotidRt'])? ($stp['CarotidRt'] == "y"? "<font color=blue>Yes</font>": "") : "" ?>
                                                        <?php echo isset($stp['CarotidRt'])? ($stp['CarotidRt'] == "n"? "<font color=red>No</font>": "") : "" ?>
                                                    </div></td></tr>
                                        </table>
                                    </td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><b><u>Heart</u></b>:</td>
                                                <td><div id="HeartNA" class="d1">
                                                        <?php echo isset($stp['HeartNA'])? ($stp['HeartNA'] == "n"? "<font color=blue>Normal</font>": "") : "" ?>
                                                        <?php echo isset($stp['HeartNA'])? ($stp['HeartNA'] == "a"? "<font color=red>Abnormal</font>": "") : "" ?>
                                                    </div></td>
                                                <td><div id="Heart" style="color:blue"><?php echo isset($stp['Heart'])?"(".$stp['Heart'].")":"" ?></div></td>
                                            </tr></table>
                                    </td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><b><u>Consciousness</u></b>:</td>
                                                <td>E </td>
                                                <td><div id="ConsciousnessE" class="d"><?php echo isset($stp['ConsciousnessE'])?$stp['ConsciousnessE']:"" ?></div></td>
                                                <td>M </td>
                                                <td><div id="ConsciousnessM" class="d"><?php echo isset($stp['ConsciousnessM'])?$stp['ConsciousnessM']:"" ?></div></td>
                                                <td>V </td>
                                                <td><div id="ConsciousnessV" class="d"><?php echo isset($stp['ConsciousnessV'])?$stp['ConsciousnessV']:"" ?></div></td>
                                            </tr></table>
                                    </td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><i><b>Orientation</b></i>:</td>
                                                <td>time</td><td><div id="OrientationTime" class="d2"><?php echo isset($stp['OrientationTime'])?$stp['OrientationTime']:"" ?></div></td>
                                                <td>place</td><td><div id="OrientationPlace" class="d2"><?php echo isset($stp['OrientationPlace'])?$stp['OrientationPlace']:"" ?></div></td>
                                                <td>person</td><td><div id="OrientationPerson" class="d2"><?php echo isset($stp['OrientationPerson'])?$stp['OrientationPerson']:"" ?></div></td>
                                            </tr></table>
                                    </td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><u><b>Speech</b></u>:</td>
                                                <td><div id="Speech" class="d2">
                                                        <?php echo isset($stp['Speech'])? ($stp['Speech'] == "d"? "dysarthric": "") : "" ?>
                                                        <?php echo isset($stp['Speech'])? ($stp['Speech'] == "a"? "aphasic": "") : "" ?>
                                                        <?php echo isset($stp['Speech'])? ($stp['Speech'] == "n"? "normal": "") : "" ?>
                                                    </div></td>
                                                <td style="font-size: 10px">&nbsp;*(dysarthric,aphasic,normal)</td>
                                            </tr></table></td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><i><b>Type of aphasia</b></i>:</td>
                                                <td><div id="Aphasia" class="d2">
                                                        <?php echo isset($stp['Aphasia'])? ($stp['Aphasia'] == "m"? "motor": "") : "" ?>
                                                        <?php echo isset($stp['Aphasia'])? ($stp['Aphasia'] == "s"? "sensory": "") : "" ?>
                                                        <?php echo isset($stp['Aphasia'])? ($stp['Aphasia'] == "g"? "global": "") : "" ?>
                                                    </div></td>
                                                <td style="font-size: 10px">&nbsp;*(motor,sensory,global)</td>
                                            </tr></table></td></tr>
                                <tr><td>
                                        <table><tr>
                                                <td><i><b>Fluency</b></i>:</td>
                                                <td><div id="Fluency" class="d2">
                                                        <?php echo isset($stp['Fluency'])? ($stp['Fluency'] == "n"? "<font color=blue>Normal</font>": "") : "" ?>
                                                        <?php echo isset($stp['Fluency'])? ($stp['Fluency'] == "a"? "<font color=red>Abnormal</font>": "") : "" ?>
                                                    </div>
                                                </td></tr></table>
                                    </td>
                                    <td>
                                        <table><tr>
                                                <td><i><b>Comprehension</b></i>:</td>
                                                <td><div id="Comprehension" class="d2">
                                                        <?php echo isset($stp['Comprehension'])? ($stp['Comprehension'] == "n"? "<font color=blue>Normal</font>": "") : "" ?>
                                                        <?php echo isset($stp['Comprehension'])? ($stp['Comprehension'] == "a"? "<font color=red>Abnormal</font>": "") : "" ?>
                                                    </div>
                                                </td></tr></table>
                                    </td></tr>
                                <tr><td>
                                        <table><tr>
                                                <td><i><b>Paraphasia</b></i>:</td>
                                                <td><div id="Paraphasia" class="d2">
                                                        <?php echo isset($stp['Paraphasia'])? ($stp['Paraphasia'] == "n"? "<font color=blue>Normal</font>": "") : "" ?>
                                                        <?php echo isset($stp['Paraphasia'])? ($stp['Paraphasia'] == "a"? "<font color=red>Abnormal</font>": "") : "" ?>
                                                    </div></td>
                                            </tr></table>
                                    </td>
                                    <td>
                                        <table><tr>
                                                <td>
                                                    <i><b>Repetition</b></i>:</td>
                                                <td><div id="Repetition" class="d2">
                                                        <?php echo isset($stp['Repetition'])? ($stp['Repetition'] == "n"? "<font color=blue>Normal</font>": "") : "" ?>
                                                        <?php echo isset($stp['Repetition'])? ($stp['Repetition'] == "a"? "<font color=red>Abnormal</font>": "") : "" ?>
                                                    </div></td>
                                            </tr></table>
                                    </td></tr>
                                <tr><td>
                                        <table><tr>
                                                <td><i><b>Naming</b></i>:</td>
                                                <td><div id="Naming" class="d2">
                                                        <?php echo isset($stp['Naming'])? ($stp['Naming'] == "n"? "<font color=blue>Normal</font>": "") : "" ?>
                                                        <?php echo isset($stp['Naming'])? ($stp['Naming'] == "a"? "<font color=red>Abnormal</font>": "") : "" ?>
                                                    </div></td></tr></table>
                                    </td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><b><u>Cranial nerves</u></b>: Eye deviation in primary position</td>
                                                <td>L:</td>
                                                <td>
                                                    <div id="CranialL" class="d2"><?php echo isset($stp['CranialL'])?$stp['CranialL']:"" ?></div>
                                                </td>
                                                <td>R:</td>
                                                <td>
                                                    <div id="CranialR" class="d2"><?php echo isset($stp['CranialR'])?$stp['CranialR']:"" ?></div>
                                                </td>
                                            </tr></table></td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><b><u>Horner's syndrome</u></b>:</td>
                                                <td>
                                                    <div id="Horner" class="d2">
                                                        <?php echo isset($stp['Horner'])? ($stp['Horner'] == "-"? "-": "") : "" ?>
                                                        <?php echo isset($stp['Horner'])? ($stp['Horner'] == "+"? "+": "") : "" ?>
                                                    </div>
                                                </td>
                                                <td>(</td>
                                                <td>
                                                    <div id="HornerLR" class="d2">
                                                        <?php echo isset($stp['HornerLR'])? ($stp['HornerLR'] == "r"? "Rt": "") : "" ?>
                                                        <?php echo isset($stp['HornerLR'])? ($stp['HornerLR'] == "l"? "Lt": "") : "" ?>
                                                    </div>
                                                </td>
                                                <td>)</td>
                                            </tr></table></td></tr>
                                <tr><td colspan="2">
                                        <table>
                                            <tr align="left">
                                                <td><i><b>Pupils</b></i>:</td>
                                                <td>Lt</td>
                                                <td><div id="PupilsLt" class="d2"><?php echo isset($stp['PupilsLt'])?$stp['PupilsLt']:"" ?></div></td>
                                                <td>mm.</td>
                                                <td><div id="PupilsLtc" class="d2">
                                                        <?php echo isset($stp['PupilsLtc'])? ($stp['PupilsLtc'] == "g"? "good": "") : "" ?>
                                                        <?php echo isset($stp['PupilsLtc'])? ($stp['PupilsLtc'] == "s"? "sluggish": "") : "" ?>
                                                        <?php echo isset($stp['PupilsLtc'])? ($stp['PupilsLtc'] == "n"? "not reactive to light": "") : "" ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr><td></td>
                                                <td>Rt </td><td>
                                                    <div id="PupilsRt" class="d2"><?php echo isset($stp['PupilsRt'])?$stp['PupilsRt']:"" ?></div></td>
                                                <td>mm.</td>
                                                <td><div id="PupilsRtc" class="d2">
                                                        <?php echo isset($stp['PupilsRtc'])? ($stp['PupilsRtc'] == "g"? "good": "") : "" ?>
                                                        <?php echo isset($stp['PupilsRtc'])? ($stp['PupilsRtc'] == "s"? "sluggish": "") : "" ?>
                                                        <?php echo isset($stp['PupilsRtc'])? ($stp['PupilsRtc'] == "n"? "not reactive to light": "") : "" ?></div></td></tr>
                                        </table></td></tr>
                                <tr><td colspan="2">
                                        <table>
                                            <tr>
                                                <td width="50"><b>VA</b>:</td>
                                                <td>Lt</td><td width="50" align="left">
                                                    <div id="VALt" class="d2"><?php echo isset($stp['VALt'])?$stp['VALt']:"" ?></div></td>
                                                <td>Rt</td><td width="50" align="left">
                                                    <div id="VARt" class="d2"><?php echo isset($stp['VARt'])?$stp['VARt']:"" ?></div></td>
                                                <td width="50"><b>VF</b>:</td>
                                                <td >Lt</td><td width="50">
                                                    <div id="VFLt" class="d2"><?php echo isset($stp['VFLt'])?$stp['VFLt']:"" ?></div></td>
                                                <td>Rt</td><td width="50">
                                                    <div id="VFRt" class="d2"><?php echo isset($stp['VFRt'])?$stp['VFRt']:"" ?></div></td></tr></table></td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><i><b>Facial weakness</b></i>:</td>
                                                <td>
                                                    <div id="FacialWeaknessLR" class="d2">
                                                        <?php echo isset($stp['FacialWeaknessLR'])? ($stp['FacialWeaknessLR'] == "l"? "Lt": "") : "" ?>
                                                        <?php echo isset($stp['FacialWeaknessLR'])? ($stp['FacialWeaknessLR'] == "r"? "Rt": "") : "" ?></div>
                                                </td><td style="font-size: 10px">&nbsp;*(Lt,Rt)</td>
                                                <td>
                                                    <div id="FacialWeaknessUL" class="d2">
                                                        <?php echo isset($stp['FacialWeaknessUL'])? ($stp['FacialWeaknessUL'] == "u"? "UMN": "") : "" ?>
                                                        <?php echo isset($stp['FacialWeaknessUL'])? ($stp['FacialWeaknessUL'] == "l"? "LMN": "") : "" ?></div>
                                                </td><td style="font-size: 10px">&nbsp;*(UMN,LMN)</td>
                                            </tr></table></td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><i><b>Tongue deviation</b></i>:</td>
                                                <td>
                                                    <div id="TongueDeviationYN" class="d2">
                                                        <?php echo isset($stp['TongueDeviationYN'])? ($stp['TongueDeviationYN'] == "y"? "Y": "") : "" ?>
                                                        <?php echo isset($stp['TongueDeviationYN'])? ($stp['TongueDeviationYN'] == "n"? "N": "") : "" ?>
                                                    </div></td>
                                                <td><div id="TongueDeviationLR" class="d2">
                                                        <?php   if(isset($stp['TongueDeviationYN']) && $stp['TongueDeviationYN']=="y") {?>
                                                            <?php      echo isset($stp['TongueDeviationLR'])? ($stp['TongueDeviationLR'] == "l"? "To (Lt)": "") : ""; ?>
                                                            <?php      echo isset($stp['TongueDeviationLR'])? ($stp['TongueDeviationLR'] == "r"? "To (Rt)": "") : "";
}?></div></td>
                                                <td></td>
                                            </tr></table></td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><i><b>Gag reflex</b></i>:</td>
                                                <td>Lt</td><td>
                                                    <div id="GagReflexL" class="d2"><?php echo isset($stp['GagReflexL'])?$stp['GagReflexL']:"" ?></div></td><td>/</td>
                                                <td>Rt </td><td>
                                                    <div id="GagReflexR" class="d2"><?php echo isset($stp['GagReflexR'])?$stp['GagReflexR']:"" ?></div></td>
                                                <td>Uvula:</td>
                                                <td>
                                                    <div id="UvalaMD" class="d2">
                                                        <?php echo isset($stp['UvalaMD'])? ($stp['UvalaMD'] == "m"? "midline": "") : "" ?>
<?php echo isset($stp['UvalaMD'])? ($stp['UvalaMD'] == "d"? "deviate to ": "") : "" ?>
                                                    </div></td><td>
                                                    <div id="UvalaMD" class="d2">
                                                        <?php if(isset($stp['UvalaMD'])&& $stp['UvalaMD'] == "d") {?>
                                                            <?php echo isset($stp['UvalaLR'])? ($stp['UvalaLR'] == "l"? "Lt": "") : "" ?>
                                                            <?php echo isset($stp['UvalaLR'])? ($stp['UvalaLR'] == "r"? "Rt": "") : "" ?>
    <?}?>
                                                    </div></td>
                                            </tr></table></td></tr>
                                <tr><td colspan="2">
                                        <table cellspacing="0" style="margin: 10px">
                                            <tr><td width="80"><u><b>Motor</b></u>:</td>
                                                <td>prox. </td>
                                                <td><div id="MotorLTp" class="d"><?php echo isset($stp['MotorLTp'])?$stp['MotorLTp']:"" ?></div></td>
                                                <td>/</td>
                                                <td>distal </td>
                                                <td><div id="MotorLTd" class="d"><?php echo isset($stp['MotorLTd'])?$stp['MotorLTd']:"" ?></div></td>
                                                <td style="border-left: black 2px solid">
                                                    prox.</td>
                                                <td><div id="MotorRTp" class="d"><?php echo isset($stp['MotorRTp'])?$stp['MotorRTp']:"" ?></div></td><td>/</td>
                                                <td>distal</td>
                                                <td><div id="MotorRTd" class="d"><?php echo isset($stp['MotorRTd'])?$stp['MotorRTd']:"" ?></div></td></tr>
                                            <tr><td></td>
                                                <td style="border-top: 2px solid black;">prox. </td>
                                                <td style="border-top: 2px solid black;"><div id="MotorLBp" class="d2"><?php echo isset($stp['MotorLBp'])?$stp['MotorLBp']:"" ?></div></td><td style="border-top: 2px solid black;">/</td>
                                                <td style="border-top: 2px solid black;">distal </td>
                                                <td style="border-top: 2px solid black;"><div id="MotorLBd" class="d2"><?php echo isset($stp['MotorLBd'])?$stp['MotorLBd']:"" ?></div></td>
                                                <td style="border-left: 2px solid black;border-top: 2px solid black">
                                                    prox.</td>
                                                <td style="border-top: 2px solid black;"><div id="MotorRBp" class="d2"><?php echo isset($stp['MotorRBp'])?$stp['MotorRBp']:"" ?></div></td><td style="border-top: 2px solid black;">/</td>
                                                <td style="border-top: 2px solid black;">distal </td>
                                                <td style="border-top: 2px solid black;"><div id="MotorRBd" class="d2"><?php echo isset($stp['MotorRBd'])?$stp['MotorRBd']:"" ?></div></td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td><i><b>Pronator drifting</b></i>:</td>
                                                <td><div id="PronatorDriftingLR" class="d">
                                                        <?php echo isset($stp['PronatorDriftingLR'])? ($stp['PronatorDriftingLR'] == "l"? "Lt": "") : "" ?>
<?php echo isset($stp['PronatorDriftingLR'])? ($stp['PronatorDriftingLR'] == "r"? "Rt": "") : "" ?>
                                                    </div></td>
                                            </tr></table></td></tr>
                                <tr><td colspan="2">
                                        <table border="1"><tr>
                                                <td><u><b>Cerebellar signs</b></u>:</td>
                                                <td><div id="CerebellarYN" class="d2">
                                                        <?php echo isset($stp['CerebellarYN'])? ($stp['CerebellarYN'] == "y"? "Y": "") : "" ?>
<?php echo isset($stp['CerebellarYN'])? ($stp['CerebellarYN'] == "n"? "N": "") : "" ?>
                                                    </div>
                                                </td>
                                                <td>Gait ataxia</td>
                                                <td>
                                                    <div id="CerebellarGLR" class="d2">
                                                        <?php echo isset($stp['CerebellarGLR'])? ($stp['CerebellarGLR'] == "l"? "Lt": "") : "" ?>
<?php echo isset($stp['CerebellarGLR'])? ($stp['CerebellarGLR'] == "r"? "Rt": "") : "" ?></div>
                                                </td>
                                                <td>,</td>
                                                <td>Trunkal ataxia</td>
                                                <td>
                                                    <div id="CerebellarTYN" class="d2">
                                                        <?php echo isset($stp['CerebellarTYN'])? ($stp['CerebellarTYN'] == "y"? "Y": "") : "" ?>
<?php echo isset($stp['CerebellarTYN'])? ($stp['CerebellarTYN'] == "n"? "N": "") : "" ?>
                                                    </div>
                                                </td><td>,</td>
                                                <td>Finger to nose</td>
                                                <td>
                                                    <div id="CerebellarFYN" class="d2">
                                                        <?php echo isset($stp['CerebellarFYN'])? ($stp['CerebellarFYN'] == "y"? "Y": "") : "" ?>
<?php echo isset($stp['CerebellarFYN'])? ($stp['CerebellarFYN'] == "n"? "N": "") : "" ?></div>
                                                </td>
                                            </tr></table>
                                    </td></tr>
                                <tr><td colspan="2">
                                        <table>
                                            <tr>
                                                <td valign="top" rowspan="3"><u><b>Sensory</b></u>:</td>
                                                <td>
                                                    <div id="SensoryTMD" class="d2">
                                                        <?php echo isset($stp['SensoryTMD'])? ($stp['SensoryTMD'] == "n"? "Normal": "") : "" ?>
                                                        <?php echo isset($stp['SensoryTMD'])? ($stp['SensoryTMD'] == "h"? "Hemianesthenia": "") : "" ?>
<?php echo isset($stp['SensoryTMD'])? ($stp['SensoryTMD'] == "p"? "Parhal hemisensory loss": "") : "" ?>
                                                    </div>
                                                </td>
                                                <td><div id="SensoryHlr">
                                                        <?php if(isset($stp['SensoryTMD']) && $stp['SensoryTMD'] == "h") {?>
                                                            <?php echo isset($stp['SensoryHlr'])? ($stp['SensoryHlr'] == "l"? "Lt": "") : "" ?>
                                                            <?php echo isset($stp['SensoryHlr'])? ($stp['SensoryHlr'] == "r"? "Rt": "") : "" ?>
    <?}?>
                                                    </div>
                                                </td>
                                                <td><div id="SensoryPlr">
                                                        <?php if(isset($stp['SensoryTMD']) && $stp['SensoryTMD'] == "p") {?>
                                                            <?php echo isset($stp['SensoryPlr'])? ($stp['SensoryPlr'] == "l"? "Lt": "") : "" ?>
                                                            <?php echo isset($stp['SensoryPlr'])? ($stp['SensoryPlr'] == "r"? "Rt": "") : "" ?>
    <?}?>
                                                    </div>
                                                </td>
                                                <td><div id="SensoryP">
                                                        <?php if(isset($stp['SensoryTMD']) && $stp['SensoryTMD'] == "p") {?>
                                                            <?php echo isset($stp['SensoryP'])?"(".$stp['SensoryP'].")":"" ?>
    <?}?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr><td style="font-size: 10px">&nbsp;*(Normal,Hemianesthenia,Parhal hemisensory loss)</td></tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td>Neglect</td>
                                                <td>Lt </td>
                                                <td><div id="NeglectLt" class="d2">
                                                        <?php echo isset($stp['NeglectLt'])?($stp['NeglectLt']=="n"?"<font color=blue>Normal</font>":""):"" ?>
<?php echo isset($stp['NeglectLt'])?($stp['NeglectLt']=="a"?"<font color=red>Abnormal</font>":""):"" ?>
                                                    </div>
                                                <td>,</td>
                                                <td>Rt </td>
                                                <td>
                                                    <div id="NeglectRt" class="d2">
                                                        <?php echo isset($stp['NeglectRt'])?($stp['NeglectRt']=="n"?"<font color=blue>Normal</font>":""):""?>
<?php echo isset($stp['NeglectRt'])?($stp['NeglectRt']=="a"?"<font color=red>Abnormal</font>":""):""?>
                                                    </div>
                                                </td></tr></table></td></tr>
                                <tr><td colspan="2">
                                        <table><tr>
                                                <td>Proprioception</td>
                                                <td>Lt</td>
                                                <td>
                                                    <div id="ProprioceptionLt" class="d2">
                                                        <?php echo isset($stp['ProprioceptionLt'])?($stp['ProprioceptionLt']=="n"?"<font color=blue>Normal</font>":""):"" ?>
<?php echo isset($stp['ProprioceptionLt'])?($stp['ProprioceptionLt']=="a"?"<font color=red>Abnormal</font>":""):"" ?>
                                                    </div></td><td>,</td>
                                                <td>Rt</td>
                                                <td>
                                                    <div id="ProprioceptionRt" class="d2">
                                                        <?php echo isset($stp['ProprioceptionRt'])?($stp['ProprioceptionRt']=="n"?"<font color=blue>Normal</font>":""):"" ?>
<?php echo isset($stp['ProprioceptionRt'])?($stp['ProprioceptionRt']=="a"?"<font color=red>Abnormal</font>":""):"" ?>
                                                    </div>
                                                </td>
                                            </tr></table>
                                    </td></tr>

                                <tr><td colspan="2">
                                        <table style="margin: 10px; border: 1px solid black; padding: 5px" width="97%" border="1">
                                            <tr><td>
                                                    <u><b>Final Dx</b></u></td>
                                                <td><div id="FinalDXHI" class="d2">
                                                        <?php echo isset($stp['FinalDXHI'])? ($stp['FinalDXHI'] == "i"? "<b>Ischemic stroke </b>": "") : "" ?>
<?php echo isset($stp['FinalDXHI'])? ($stp['FinalDXHI'] == "h"? "<b>Hemorrhagic stroke </b>": "") : "" ?>
                                                    </div></td>
                                                <td>
                                                    <div id="FinalDXHType" class="d2">
                                                        <?php if(isset($stp['FinalDXHI'])&& $stp['FinalDXHI'] == "h") {?>
                                                            <?php echo isset($stp['FinalDXHType'])?"Type: ".$stp['FinalDXHType']:"" ?>
    <?php }?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr><td></td><td style="font-size: 10px">&nbsp;*(Ischemic stroke,Hemorrhagic stroke)</td></tr>
                                            <tr><td width="80"><b>Vessel</b></td>
                                                <td><table><tr><td>
                                                                <div id="VesselAP" class="d2">
                                                                    <?php echo isset($stp['VesselAP'])? ($stp['VesselAP'] == "a"? "Anterior circulation :": "") : "" ?>
<?php echo isset($stp['VesselAP'])? ($stp['VesselAP'] == "p"? "Posterior circulation:": "") : "" ?>
                                                                </div></td><td>
                                                                <div id="VesselAc" class="d2">
                                                                    <?php if(isset($stp['VesselAP'])&& $stp['VesselAP'] == "a") {?>
                                                                        <?php echo isset($stp['VesselAc'])? ($stp['VesselAc'] == "a"? "ACA": "") : "" ?>
    <?php echo isset($stp['VesselAc'])? ($stp['VesselAc'] == "m"? "MCA ": "") : "" ?>
                                                                </div>
    <?php }?></td>
                                                            <td>
                                                                <div id="VesselPc" style="color: blue;">
<?php if(isset($stp['VesselAP'])&&$stp['VesselAP'] == "p") {?>

                                                                        <?php echo isset($stp['VesselPc'])? ($stp['VesselPc'] == "pc"? "PCA": "") : "" ?>
                                                                        <?php echo isset($stp['VesselPc'])? ($stp['VesselPc'] == "vb"? "VB": "") : "" ?>
                                                                        <?php echo isset($stp['VesselPc'])? ($stp['VesselPc'] == "pi"? "PICA": "") : "" ?>
                                                                        <?php echo isset($stp['VesselPc'])? ($stp['VesselPc'] == "ai"? "AICA": "") : "" ?>
    <?php echo isset($stp['VesselPc'])? ($stp['VesselPc'] == "ce"? "Cerebellar": "") : "" ?>
                                                                </div>
    <?}?>
                                                            </td></tr>
                                                    </table></td></tr>
                                            <tr><td><b>Cause</b></td>
                                                <td><table><tr>
                                                            <td>
                                                                <div id="Cause" class="d2">
                                                                    <?php echo isset($stp['Cause'])? ($stp['Cause'] == "e"? "<b>Emboli :</b>": "") : "" ?>
                                                                    <?php echo isset($stp['Cause'])? ($stp['Cause'] == "t"? "<b>Thrombosis</b>": "") : "" ?>
                                                                    <?php echo isset($stp['Cause'])? ($stp['Cause'] == "l"? "<b>Lacunar stroke </b>: type": "") : "" ?>
<?php echo isset($stp['Cause'])? ($stp['Cause'] == "o"? "<b>Others</b>": "") : "" ?>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <div id="CauseE" class="d2">
                                                                    <?php if(isset($stp['Cause'])&&$stp['Cause'] == "e") {?>
                                                                        <?php echo isset($stp['CauseE'])? ($stp['CauseE'] == "c"? "cardiac": "") : "" ?>
                                                                        <?php echo isset($stp['CauseE'])? ($stp['CauseE'] == "a"? "artery": "") : "" ?>
                                                                        <?php echo isset($stp['CauseE'])? ($stp['CauseE'] == "u"? "unknown": "") : "" ?>
    <?php }?>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <div id="CauseLType" class="d2">
                                                                    <?php if(isset($stp['Cause'])&&$stp['Cause'] == "l") {?>
                                                                        <?php echo isset($stp['CauseLType'])? ($stp['CauseLType'] == "pm"? "Pure motor syndrome": "") : "" ?>
                                                                        <?php echo isset($stp['CauseLType'])? ($stp['CauseLType'] == "ps"? "Pure sensory syndrome": "") : "" ?>
                                                                        <?php echo isset($stp['CauseLType'])? ($stp['CauseLType'] == "ah"? "Ataxic hemiparesis": "") : "" ?>
                                                                        <?php echo isset($stp['CauseLType'])? ($stp['CauseLType'] == "dc"? "Dysarthria clumsy hand syndrome": "") : "" ?>
                                                                        <?php echo isset($stp['CauseLType'])? ($stp['CauseLType'] == "sm"? "Sensori-motor syndrome": "") : "" ?>
    <?php }?>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <div id="CauseOther" class="d2">
                                                                    <?php if(isset($stp['Cause'])&&$stp['Cause'] == "o") {?>
                                                                        <?php echo isset($stp['CauseOther'])? $stp['CauseOther']: "" ?>
    <?php }?>
                                                                </div>
                                                            </td></tr></table>
                                                </td>
                                            </tr>
                                            <tr><td><b>Stage</b> :</td>
                                                <td>
                                                    <div id="Stage" class="d2">
                                                        <?php echo isset($stp['Stage'])? ($stp['Stage'] == "s"? "Stable": "") : "" ?>
                                                        <?php echo isset($stp['Stage'])? ($stp['Stage'] == "p"? "Progressive": "") : "" ?>
                                                        <?php echo isset($stp['Stage'])? ($stp['Stage'] == "c"? "Completed": "") : "" ?>
                                                        <?php echo isset($stp['Stage'])? ($stp['Stage'] == "i"? "Improved": "") : "" ?>
<?php echo isset($stp['Stage'])? ($stp['Stage'] == "t"? "TIA": "") : "" ?>
                                                    </div>
                                                </td></tr>
                                        </table>
                                    </td></tr>
                                <tr><td colspan="2"><table><tr><td><b>Other</b></td><td>
                                                    <div id="stp_others" class="d2"><?php echo isset($stp['stp_others'])?$stp['stp_others']:"" ?></div></td></tr></table></td></tr>
                                <tr><td colspan="2"><table><tr><td><b>Provisional Diagnosis</b></td><td>
                                                    <div id="ProvisionalDiagnosis" class="d2"><?php echo isset($stp['ProvisionalDiagnosis'])?$stp['ProvisionalDiagnosis']:"" ?></div></td></tr></table></td></tr>
                            </tbody>
                        </table>
                    </div>

                    <div id="tabs-4">
                        <table id="users" class="ui-widget ui-widget-content ui-corner-all" width="100%" style="margin-top: 10px;padding-bottom: 10px;">
                            <thead>
                                <tr class="ui-widget-header ">
                                    <th colspan="7" align="left" style="padding: 10px">Laboratory screen for exclusion</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr><td>
                                        <table style="width: 100%;border: solid 1px silver">
                                            <tr>
                                                <td valign="middle" align="center">
                                                    <div align="left"><b>CT Scan File</b></div>
                                                    <div id="CTScanFile" ></div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td></tr>
                                <tr><td><input type="checkbox" id="CTscanYN"name="CTscanYN" disabled <?php echo isset($lab['CTscanYN'])? ($lab['CTscanYN'] == "true"? "checked": "") : "" ?>>CT scan                                        </td></tr>
                                <tr><td>&nbsp;&nbsp;
                                        <input type="checkbox" id="CTNoICHYN" name="CTNoICHYN" disabled <?php echo isset($lab['CTNoICHYN'])? ($lab['CTNoICHYN'] == "true"? "checked": "") : "" ?>> No ICH
                                        <input type="checkbox" id="CTnobrainYN" name="CTnobrainYN"  disabled <?php echo isset($lab['CTnobrainYN'])? ($lab['CTnobrainYN'] == "true"? "checked": "") : "" ?>> no brain edema/shiffing </td></tr>
                                <!--<tr><td><input type="checkbox" id="CTPerfusionYN" name="CTPerfusionYN"  disabled <?php echo isset($lab['CTPerfusionYN'])? ($lab['CTPerfusionYN'] == "true"? "checked": "") : "" ?>> Phinal</td></tr>-->
                                <tr><td><table><tr><td><input type="checkbox" id="MRIYN" disabled name="MRIYN" <?php echo isset($lab['MRIYN'])? ($lab['MRIYN'] == "true"? "checked": "") : "" ?>></td>
                                                <td>MRI result:</td><td> <div id="MRIResult" class="d2"><?php echo isset($lab['MRIResult'])?$lab['MRIResult']:"" ?></div></td></tr></table></td></tr>
                                <tr><td>&nbsp;&nbsp;<input type="checkbox" id="MRINoICHYN" name="MRINoICHYN" disabled <?php echo isset($lab['MRINoICHYN'])? ($lab['MRINoICHYN'] == "true"? "checked": "") : "" ?>> No ICH
                                        <input type="checkbox" id="MRInobrainYN" name="MRInobrainYN" disabled <?php echo isset($lab['MRInobrainYN'])? ($lab['MRInobrainYN'] == "true"? "checked": "") : "" ?>> no brain edema/shiffing </td></tr>
                                <tr><td>&nbsp;&nbsp;<input type="checkbox" id="MRIDWI30YN" name="MRIDWI30YN" disabled <?php echo isset($lab['MRIDWI30YN'])? ($lab['MRIDWI30YN'] == "true"? "checked": "") : "" ?>> DWI &le; 30% of MCA territory </td></tr>
                                <tr><td>&nbsp;&nbsp;<input type="checkbox" id="MRIDWIPWIYN" name="MRIDWIPWIYN" disabled <?php echo isset($lab['MRIDWIPWIYN'])? ($lab['MRIDWIPWIYN'] == "true"? "checked": "") : "" ?>> DWI / PWI mismatch </td></tr>
                                <tr><td><input type="checkbox" id="MRAYN" name="MRAYN" disabled <?php echo isset($lab['MRAYN'])? ($lab['MRAYN'] == "true"? "checked": "") : "" ?>> MRA</td></tr>
                                <tr><td><table><tr><td>&nbsp;
                                                    <input type="checkbox" id="MRAMCAYN" name="MRAMCAYN" disabled <?php echo isset($lab['MRAMCAYN'])? ($lab['MRAMCAYN'] == "true"? "checked": "") : "" ?>> MCA</td>
                                                <td>
                                                    <div id="MRAMCAso" class="d2">
                                                        <?php if(isset($lab['MRAMCAYN']) && $lab['MRAMCAYN'] == "true") {?>
                                                            <?php echo isset($lab['MRAMCAso'])? ($lab['MRAMCAso'] == "s"? "(Stenosis)": "") : "" ?>
                                                            <?php echo isset($lab['MRAMCAso'])? ($lab['MRAMCAso'] == "o"? "(Occlusion)": "") : "" ?>
    <?php }?>
                                                    </div></td>
                                            </tr></table>
                                    </td></tr>
                                <tr><td><table><tr><td>&nbsp;
                                                    <input type="checkbox" id="MRAACAYN" name="MRAACAYN" disabled <?php echo isset($lab['MRAACAYN'])? ($lab['MRAACAYN'] == "true"? "checked": "") : "" ?>> ACA</td>
                                                <td>
                                                    <div id="MRAACAso" class="d2">
<?php if(isset($lab['MRAACAYN']) && $lab['MRAACAYN'] == "true") {?>

                                                            <?php echo isset($lab['MRAACAso'])? ($lab['MRAACAso'] == "s"? "(Stenosis)": "") : "" ?>
    <?php echo isset($lab['MRAACAso'])? ($lab['MRAACAso'] == "o"? "(Occlusion)": "") : "" ?>

    <?php }?>
                                                    </div></td>
                                            </tr></table>
                                    </td></tr>
                                <tr><td><table>
                                            <tr>
                                                <td>&nbsp;
                                                    <input type="checkbox" id="MRABAYN" name="MRABAYN" disabled <?php echo isset($lab['MRABAYN'])? ($lab['MRABAYN'] == "true"? "checked": "") : "" ?>> BA
                                                </td>
                                                <td>
                                                    <div id="MRABAso" class="d2">
<?php if(isset($lab['MRABAYN']) && $lab['MRABAYN'] == "true") {?>

                                                            <?php echo isset($lab['MRABAso'])? ($lab['MRABAso'] == "s"? "(Stenosis)": "") : "" ?>
    <?php echo isset($lab['MRABAso'])? ($lab['MRABAso'] == "o"? "(Occlusion)": "") : "" ?>

    <?php }?>
                                                    </div></td>
                                            </tr></table>
                                    </td></tr>
                                <tr><td><table>
                                            <tr>
                                                <td>&nbsp;
                                                    <input type="checkbox" id="MRAICAYN" name="MRAICAYN" disabled <?php echo isset($lab['MRAICAYN'])? ($lab['MRAICAYN'] == "true"? "checked": "") : "" ?>> ICA
                                                </td>
                                                <td>
                                                    <div id="MRAICAso" class="d2">
                                                        <?php if(isset($lab['MRAICAYN']) && $lab['MRAICAYN'] == "true") {?>
                                                            <?php echo isset($lab['MRAICAso'])? ($lab['MRAICAso'] == "s"? "(Stenosis)": "") : "" ?>
    <?php echo isset($lab['MRAICAso'])? ($lab['MRAICAso'] == "o"? "(Occlusion)": "") : "" ?>

    <?php }?>
                                                    </div></td>
                                            </tr></table>
                                    </td></tr>
                                <tr><td><table>
                                            <tr>
                                                <td>&nbsp;
                                                    <input type="checkbox" id="MRAotherYN" name="MRAotherYN" disabled <?php echo isset($lab['MRAotherYN'])? ($lab['MRAotherYN'] == "true"? "checked": "") : "" ?>> other
                                                </td>
                                                <td>
                                                    <div id="MRAother" class="d2">
                                                        <?php if(isset($lab['MRAotherYN']) && $lab['MRAotherYN'] == "true") {?>
                                                            <?php echo isset($lab['MRAother'])?$lab['MRAother']:"" ?>
    <?php }?>
                                                    </div>
                                                </td>
                                            </tr></table>
                                    </td></tr>
                                <tr><td><hr></td></tr>
                                <tr><td>Blood test result</td></tr>
                                <tr><td>
                                        <table><tr>
                                                <td>PG</td><td><div id="BloodPG" class="d2"><?php echo isset($lab['BloodPG'])?$lab['BloodPG']:"" ?></div></td><td> mg/dl</td></tr>
                                            <tr>
                                                <td>PT </td><td><div id="BloodPT" class="d2"><?php echo isset($lab['BloodPT'])?$lab['BloodPT']:"" ?></div></td><td> sec.</td></tr>
                                            <tr>
                                                <td>PTT </td><td><div id="BloodPTT" class="d2"><?php echo isset($lab['BloodPTT'])?$lab['BloodPTT']:"" ?></div></td><td> sec.</td></tr>
                                            <tr>
                                                <td>PLT </td><td><div id="BloodPLT" class="d2"><?php echo isset($lab['BloodPLT'])?$lab['BloodPLT']:"" ?></div></td><td> /cumm.</td></tr>
                                        </table>
                                    </td></tr>
                                <tr><td>
                                        <table style="margin-left: 20px">
                                            <tr><td width="400" id="td_BloodPGYN">
                                                    <input type="checkbox" id="BloodPGYN" name="BloodPGYN" disabled <?php echo isset($lab['BloodPGYN'])? ($lab['BloodPGYN'] == "true"? "checked": "") : "" ?>> PG > 50 < 400 mg/dl</td>
                                                <td id="td_BloodPLTYN"><input type="checkbox" id="BloodPLTYN" name="BloodPLTYN" disabled <?php echo isset($lab['BloodPLTYN'])? ($lab['BloodPLTYN'] == "true"? "checked": "") : "" ?>> PLT > 100,000</td></tr>
                                            <tr><td><input type="checkbox" id="BloodINRYN" name="BloodINRYN" disabled <?php echo isset($lab['BloodINRYN'])? ($lab['BloodINRYN'] == "true"? "checked": "") : "" ?>> INR < 1.7 </td><td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>

                            </tbody>
                        </table>
                    </div>
                    <div id="tabs-5">
                        <table width="100%" class="ui-widget ui-widget-content ui-corner-all">
                            <tr class="ui-widget-header ">
                                <td colspan="3">ข้อบ่งชี้</td>
                            </tr>
                            <tr><td><input type="checkbox" id="estimate_i1" name="estimate_i1" disabled <?php echo isset($est['estimate_i1'])? ($est['estimate_i1'] == "true"? "checked": "") : "" ?>></td><td>1. มีอาการของสมองขาดเลือดภายใน 3 ชั่วโมง</td></tr>
                            <tr bgcolor="#E4E4E4"><td><input type="checkbox" id="estimate_i2" disabled <?php echo isset($est['estimate_i2'])? ($est['estimate_i2'] == "true"? "checked": "") : "" ?> name="estimate_i2" ></td><td>2. มีความผิดปกติทางระบบประสาทที่ตรวจพบได้</td></tr>
                            <tr><td><input type="checkbox" id="estimate_i3" name="estimate_i3" disabled <?php echo isset($est['estimate_i3'])? ($est['estimate_i3'] == "true"? "checked": "") : "" ?>></td><td>3. ผลการตรวจเอกซเรย์คอมพิวเตอร์สมองไม่พบว่ามีเลือดออกในเนื้อสมองหรือเลือดออกในชั้นใต้เยื่อหุ้มสมอง</td></tr>
                        </table>
                        <br>
                        <table width="100%" class="ui-widget ui-widget-content ui-corner-all" >
                            <tr class="ui-widget-header "><td colspan="3">ข้อห้าม</td></tr>

                            <tr><td>
                                    <input type="checkbox" id="estimate_d1" name="estimate_d1" disabled <?php echo isset($est['estimate_d1'])? ($est['estimate_d1'] == "true"? "checked": "") : "" ?>></td><td>1. มีประวัติเลือดออกในสมองมาก่อน</td></tr>
                            <tr bgcolor="#E4E4E4"><td>
                                    <input type="checkbox" id="estimate_d2" name="estimate_d2" disabled <?php echo isset($est['estimate_d2'])? ($est['estimate_d2'] == "true"? "checked": "") : "" ?>></td><td>2. มีประวัติบาดเจ็บที่ศีรษะรุนแรงภายใน 3 เดือน</td></tr>
                            <tr><td><input type="checkbox" id="estimate_d3" name="estimate_d3" disabled <?php echo isset($est['estimate_d3'])? ($est['estimate_d3'] == "true"? "checked": "") : "" ?>></td><td>3. มีประวัติผ่าตัดใหญ่ภายใน 14 วัน</td></tr>
                            <tr bgcolor="#E4E4E4"><td>
                                    <input type="checkbox" id="estimate_d4" name="estimate_d4" disabled <?php echo isset($est['estimate_d4'])? ($est['estimate_d4'] == "true"? "checked": "") : "" ?>></td><td>4. มีเลือดออกในทางเดินอาหาร หรือทางเดินปัสสาวะภายใน 21 วัน</td></tr>
                            <tr><td><input type="checkbox" id="estimate_d5" name="estimate_d5" disabled <?php echo isset($est['estimate_d5'])? ($est['estimate_d5'] == "true"? "checked": "") : "" ?>></td><td>5. ผู้ป่วยที่มีอาการทางระบบประสาทดีขึ้นเองอย่างมากในเวลาอันรวดเร็ว หรือมีอาการน้อยก่อให้เกิดความพิการที่ไม่รุนแรง เช่น ชา เล็กน้อยเพียงอย่างเดียว</td></tr>
                            <tr bgcolor="#E4E4E4"><td>
                                    <input type="checkbox" id="estimate_d6" name="estimate_d6" disabled <?php echo isset($est['estimate_d6'])? ($est['estimate_d6'] == "true"? "checked": "") : "" ?>></td><td>6. มีอาการชักแต่เริ่มแรก</td></tr>
                            <tr><td><input type="checkbox" id="estimate_d7" name="estimate_d7" disabled <?php echo isset($est['estimate_d7'])? ($est['estimate_d7'] == "true"? "checked": "") : "" ?>></td><td>7. มีประวัติกล้ามเนื้อหัวใจขาดเลือดเฉียบพลันในช่วงเวลาอันใกล้</td></tr>
                            <tr bgcolor="#E4E4E4"><td>
                                    <input type="checkbox" id="estimate_d8" name="estimate_d8" disabled <?php echo isset($est['estimate_d8'])? ($est['estimate_d8'] == "true"? "checked": "") : "" ?>></td><td>8. ความดันโลหิตช่วงก่อนให้การรักษาสูงโดยความดันซิสโตลิคสูงกว่า 185 มม.ปรอทหรือความดันไดแอสโตลิคสูงกว่า 110 มม.ปรอท</td></tr>
                            <tr><td><input type="checkbox" id="estimate_d9" name="estimate_d9" disabled <?php echo isset($est['estimate_d9'])? ($est['estimate_d9'] == "true"? "checked": "") : "" ?>></td><td>9. มีระดับน้ำตาลในเลือดต่ำกว่า 50 มก/ดล. หรือสูงกว่า 400 มก/ดล.</td></tr>
                            <tr bgcolor="#E4E4E4"><td>
                                    <input type="checkbox" id="estimate_d10" name="estimate_d10" disabled <?php echo isset($est['estimate_d10'])? ($est['estimate_d10'] == "true"? "checked": "") : "" ?>></td><td>10. มีปริมาณเกล็ดเลือดน้อยกว่า 100,000/mm3</td></tr>
                            <tr><td><input type="checkbox" id="estimate_d11" name="estimate_d11" disabled <?php echo isset($est['estimate_d11'])? ($est['estimate_d11'] == "true"? "checked": "") : "" ?>></td><td>11. ได้รับยา heparin ภายใน 48 ชั่วโมงและมีค่า partial thromboplastin time(PTT) ผิดปกติ</td></tr>
                            <tr bgcolor="#E4E4E4"><td>
                                    <input type="checkbox" id="estimate_d12" name="estimate_d12" disabled <?php echo isset($est['estimate_d12'])? ($est['estimate_d12'] == "true"? "checked": "") : "" ?>></td><td>12. ได้รับยาต้านการแข็งตัวของเลือดโดยมีค่า protrombin time(PT) มากกว่า 15 วินาที หรือมีค่า international normalized ratio (INR) มากกว่า 1.7 </td></tr>
                        </table>
                        <br>
                        <table width="100%" class="ui-widget ui-widget-content ui-corner-all" >
                            <tr class="ui-widget-header "><td colspan="3">อธิบายเหตุผล</td></tr>

                            <tr><td align="left">
                                    <div id="estimate_reason" class="2"><?php echo isset($est['estimate_reason'])? $est['estimate_reason'] : "" ?></div>
                                </td></tr>

                        </table>
                    </div>
                    <div id="tabs-6">
                        <table class="ui-widget ui-widget-content ui-corner-all" width="90%">
                            <thead>
                                <tr class="ui-widget-header">
                                    <td>Management</td>
                                </tr>
                            </thead>
                            <tr>
                                <td><br>
                                    <u><b>Initial Management</b></u><br>
                                    <table width="500" align="left">

                                        <tr><td width="10"></td><td colspan="2"><input type="checkbox" id="im_IVfluidYN" disabled <?php echo isset($mng['im_IVfluidYN'])? ($mng['im_IVfluidYN'] == "true"? "checked": "") : "" ?>>IV fluid</td></tr>
                                        <tr><td></td><td colspan="2"><input type="checkbox" id="im_O2CanulaYN" disabled <?php echo isset($mng['im_O2CanulaYN'])? ($mng['im_O2CanulaYN'] == "true"? "checked": "") : "" ?>>O2 Canula</td></tr>
                                        <tr><td></td><td colspan="2"><input type="checkbox" id="im_IntubationYN"  disabled <?php echo isset($mng['im_IntubationYN'])? ($mng['im_IntubationYN'] == "true"? "checked": "") : "" ?>>Intubation</td></tr>
                                        <tr><td></td><td width="90"><input type="checkbox" id="im_OtherYn" disabled <?php echo isset($mng['im_OtherYn'])? ($mng['im_OtherYn'] == "true"? "checked": "") : "" ?>>Other </td>
                                            <td><div id="im_OtherTxt" class="d2"><?php echo isset($mng['im_OtherTxt'])? $mng['im_OtherTxt'] : "" ?></div></td></tr>
                                    </table></td>
                            </tr>
                            <tr>
                                <td><br>
                                    <u><b>Suggented Management</b></u><br>
                                    <table width="500" align="left">
                                        <tr><td width="10"></td><td><input type="checkbox" id="sm_IVTYn" disabled <?php echo isset($mng['sm_IVTYn'])? ($mng['sm_IVTYn'] == "true"? "checked": "") : "" ?>>IV Thrombolysis เริ่มเวลา <input type="text" id="sm_IVTStartTime" value="<?php echo isset($mng['sm_IVTStartTime'])? $mng['sm_IVTStartTime'] : "" ?>"></td></tr>
                                        <tr><td></td><td><input type="checkbox" id="sm_NIVTYn" disabled <?php echo isset($mng['sm_NIVTYn'])? ($mng['sm_NIVTYn'] == "true"? "checked": "") : "" ?>>No IV Thormbolysis เนื่องจาก</td></tr>
                                        <tr><td></td><td><input type="checkbox" id="sm_OtherYN" disabled <?php echo isset($mng['sm_OtherYN'])? ($mng['sm_OtherYN'] == "true"? "checked": "") : "" ?>>Other <input type="text" id="sm_OtherTxt" value="<?php echo isset($mng['sm_OtherTxt'])? $mng['sm_OtherTxt'] : "" ?>"></td></tr>
                                    </table>
                                </td>
                            </tr>

                        </table>
                    </div>                    
                </div>
                <table width="100%"><tr><td align="center" colspan="3"></td></tr></table>
            </td>
        </tr>
    </table>
</div>